package com.cloudeoffice.server.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//公共返回对象
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RespBean {
    private long code;
    private String message;
    private Object object;
    //成功返回的结果
    public static RespBean success(String message){
        return new RespBean(200,message,null);
    }
    public static RespBean success(String message,Object object){
        return new RespBean(200,message,object);
    }

    //失败返回的结果
    public static RespBean failure(String message){
        return new RespBean(500,message,null);
    }
    public static RespBean failure(String message,Object object){
        return new RespBean(500,message,object);
    }
}
